package controllers.user

import controllers.checkLogin
import play.api.Logging
import play.api.mvc._
import services.mes.MoreMesService
import javax.inject.{Inject, Singleton}
import scala.concurrent.ExecutionContext

@Singleton
class ErpMesController @Inject()(
                                  cc: ControllerComponents
                                )(implicit exec: ExecutionContext, parser: BodyParsers.Default)
  extends AbstractController(cc)
    with Logging {
  implicit val myCustomCharset = Codec.javaSupported("gb18030")

  def index = checkLogin(parser, exec) { implicit request =>
    val otype = MoreMesService.getOtype()
    Ok(views.html.users.mes_ordersync("金蝶同步至摩尔MES", otype))
  }

  def show(page: String) = Action { implicit request =>
    logger.debug(page)
    Ok(page)
  }

}
